package com.xncoding.valid.Aware;

import org.springframework.context.annotation.ImportAware;
import org.springframework.core.type.AnnotationMetadata;

import java.util.Map;

public class MyImportAware  implements ImportAware {
    @Override
    public void setImportMetadata(AnnotationMetadata importMetadata) {
        // 访问导入类的注解元数据
        Map<String, Object> attributes = importMetadata.getAnnotationAttributes("");
        if (attributes != null) {
            // 根据注解的属性值执行自定义逻辑
            // ...
        }
    }
    // 类的其他内容
}
